package com.cmwa.scbp.business.myHome.todo.service;

import java.util.concurrent.ConcurrentHashMap;

import com.cmwa.scbp.business.myHome.todo.enums.ServiceType;

public class TodoBizRelGenerateFactory {

	public static ConcurrentHashMap<ServiceType, TodoBizRelGenerator> generatorMap = new ConcurrentHashMap<>();
	
	public static void addGenerator(ServiceType serviceType, TodoBizRelGenerator generator) {
		generatorMap.put(serviceType, generator);
	}
	
	public static TodoBizRelGenerator getGenerator(ServiceType serviceType) {
		if (generatorMap.containsKey(serviceType)) {
			return generatorMap.get(serviceType);
		}
		return null;
	}
}
